import { request } from '@/service/request';

/** 获取音效配置列表 */
export function fetchGetAudioConfigList (params?: Api.Relax.AudioConfigSearchParams) {
    return request<Api.Relax.AudioConfigList>({
        url: '/relax/audioConfig/list',
        method: 'get',
        params
    });
}

/** 新增音效配置 */
export function fetchCreateAudioConfig (data: Api.Relax.AudioConfigOperateParams) {
    return request<boolean>({
        url: '/relax/audioConfig',
        method: 'post',
        data
    });
}

/** 修改音效配置 */
export function fetchUpdateAudioConfig (data: Api.Relax.AudioConfigOperateParams) {
    return request<boolean>({
        url: '/relax/audioConfig',
        method: 'put',
        data
    });
}

/** 批量删除音效配置 */
export function fetchBatchDeleteAudioConfig (audioIds: CommonType.IdType[]) {
    return request<boolean>({
        url: `/relax/audioConfig/${audioIds.join(',')}`,
        method: 'delete'
    });
}
